/*
Thomas J. Leeper	
Proposal title: Are Population-Based Survey Experiments Truly Unparalleled? A Test Using Parallel Designs


HYPOTHESES

Stated-Hyp1: "Effect estimates from samples with high attitude importance should be smaller due to participants' lesser influence by attitude-relevant information" (p. 3)
	// see pages 4-5 and the notes below for details.

	Test-Hypx: Study 1: Support for student loan forgiveness will be lower in individual responsibility (treatment) condition vs. control, moderated by student loan status (smaller effect on students)

	Test-Hypx: Study 1: Willingness to sign petition for student loan forgiveness will be lower in individual responsibility (treatment) condition vs. control, moderated by student loan status (smaller effect on students)

	// NOTE: cannot test the hypotheses for study 1 because we need data on student status to test the hypothesis (student status is the moderator)
		
	Test-Hyp1: Study 2: Support for the DREAM Act will be lower in polarized vs. non-polarized conditions, for Republican respondents, moderated by issue importance 

	Test-Hyp2: Study 2: Willingness to sign petition for the DREAM ACT will be lower in polarized vs. non-polarized conditions,  for Republican respondents, moderated by issue importance 
	
	Test-Hyp3: Study 2: Support for the DREAM Act will be higher in polarized vs. non-polarized conditions, for Democrat respondents, moderated by issue importance 

	Test-Hyp4: Study 2: Willingness to sign petition for the DREAM ACT will be higher in polarized vs. non-polarized conditions,  for Democrat respondents, moderated by issue importance 	
	
	Test-Hyp5: Study 3: Support for free speech will be higher in partisan cue condition (treatment) vs. control, moderated by distance (larger effect for local rally)

	Test-Hyp6: Study 3: Willingness to sign petition for free speech will be higher in partisan cue condition (treatment) vs. control, moderated by distance (larger effect for local rally)	
	
Stated-Hyp2: "When the research setting increases attitude accessibility (e.g., through higher self interest) and/or increases individuals cognitive engagement with the experimental stimuli (i.e., in laboratories), individuals should be more influenced by experimental stimuli than when less engaged (e.g., as part of a one-off, opt-in web survey)."

	// cannot test because there are no relevant data.


********************************************************************************
NOTES:
- The study has 3 experiments, see pages 4 and 5: 
1) media framing of hate group rally; strength manipulated as local/distant
2) influence of partisan cues on support for immigration reform; moderator is strength of partisan cue
3) student loan forgiveness; strength manipulated as student/non-student status
	- Each stated hypothesis pertains to all three studies.

- analysis plan is complex involves both "simple comparisons of treatment 
effects as well as several sophisticated propensity score-based and Bayesian 
techniques". (p. 4) We are only comparing treatment effects here. 

- To test hypotheses for study 2, we have stratified by partisan identity.	

- To test hypotheses for study 1, we need to know the respondents' student loan 
status. There is no data on student loan status. 

- To test stated hypothesis 2, we will need a measure of issue importance that 
is experimentally manipulated. This hypothesis cannot be tested.
*/

clear all
use "Leeper354.dta", clear

********************************************************************************

* INDICATORS OF EXPERIMENTAL MANIPULATIONS

* Study 1: loan forgiveness
	tab STUDY1_ASSIGN 
	clonevar treat1= STUDY1_ASSIGN 

* Study 2: immigration reform 
	tab STUDY2_ASSIGN 		
	recode STUDY2_ASSIGN (1 3=1 "polarized") (2 4=0 "non-polarized") (5=3 "control"), gen(treat2)
	tab treat2		
	
	
* Study 3: hate speech 
	tab STUDY3_ASSIGN 		
	recode 	STUDY3_ASSIGN (1 3 =1 "treatment") (2 4 =0 "control"), gen(treat3)
	tab treat3
	recode 	STUDY3_ASSIGN (1 2 =1 "local") (3 4 =0 "distant"), gen(moderator3)
	tab moderator3
	
* OUTCOME MEASURES
	foreach var in Q2 Q5 Q6 Q9 Q10 Q13 {
		replace `var'=. if `var'==-1
		tab `var'
	}
	
	* recode petition variables (binary)
	foreach var in Q5 Q9 Q13 {
		recode `var' (1=0) (2=1)
		tab `var'
	}	

	* Study 1: loan forgiveness
		* support for policy
		tab Q2
		clonevar support1=Q2
		
		* willingness to sign petition
		gen petition1= Q5
		
	* Study 2: immigration reform
		* support for policy
		clonevar support2=Q6
		
		* willingness to sign petition
		gen petition2= Q9
		
	* Study 3: hate speech 
		* support for policy
		clonevar support3=Q10
		
		* willingness to sign petition
		gen petition3= Q13	
	
	
* MODERATORS
	
* issue importance	
		* study 2: immigration
		clonevar importance2=Q8
		
		
* partisan identity 	
	recode PARTY7 (1/3=1 "republican") (4=.) (5/7=0 "democrat"), gen(republican)
	tab republican
	
********************************************************************************

* ANALYSIS
	
*	Test-Hyp1: Study 2: Support for the DREAM Act will be lower in polarized vs. non-polarized conditions, for Republican respondents
	reg support2 i.treat2##c.importance2 if republican==1
	// reject. 0.285
	tess 1.treat2#c.importance2 -, init(Leeper354) bonf(2)
	
*Test-Hyp2: Study 2: Willingness to sign petition for the DREAM ACT will be lower in polarized vs. non-polarized conditions,  for Republican respondents
	reg petition2 i.treat2##c.importance2 if republican==1
	// reject. 0.233
	tess 1.treat2#c.importance2 -, bonf(2)
	
*Test-Hyp3: Study 2: Support for the DREAM Act will be higher in polarized vs. non-polarized conditions, for Democrat respondents
	reg support2 i.treat2##c.importance2 if republican==0
	// reject. 0.083
	tess 1.treat2#c.importance2 +, bonf(2)
	
*Test-Hyp4: Study 2: Willingness to sign petition for the DREAM ACT will be higher in polarized vs. non-polarized conditions,  for Democrat respondents	
	reg petition2 i.treat2##c.importance2 if republican==0
	// reject. 0.792
	tess 1.treat2#c.importance2 +, bonf(2)
	
*Test-Hyp5: Study 3: Support for free speech will be higher in partisan cue condition (treatment) vs. control, moderated by distance (larger effect for local rally)
	reg support3 i.treat3##i.moderator3
	// reject. 0.602
	tess 1.treat3#1.moderator3 +, bonf(2)
	
*Test-Hyp6: Study 3: Willingness to sign petition for free speech will be higher in partisan cue condition (treatment) vs. control, moderated by distance (larger effect for local rally)	
	reg petition3 i.treat3##i.moderator3
	// reject. 0.847
	tess 1.treat3#1.moderator3 +, bonf(2)	
